import org.junit.Test;

public class NGuessNumberTest {

    @Test
    public void generateAnswerTest() {
        NGuessNumber nGuessNumber = new NGuessNumber();
        int a[] = nGuessNumber.generateAnswer();
        boolean b=false;
        int x=0;
        if(a.length==4){
            for(int i=0;i<4;i++){
                for(int j=3;j>i;j--){
                    if(a[i]==a[j]){
                        x=1;
                    }
                }
                if(!(a[i]>=0&&a[i]<=9)){
                    x=1;
                }
            }
        }else{
            x=1;
        }
        if(x!=1){
            b=true;
            System.out.println("无错");
        }
        int m[] = nGuessNumber.getPlayerInput();
        int n = nGuessNumber.compareGuessAnswer(a,m);
    }
    @Test
    public void isWin(){
        NGuessNumber nGuessNumber = new NGuessNumber();
        int a[] = nGuessNumber.generateAnswer();
        nGuessNumber.isWin(a);
    }
    @Test
    public void main() {
    }
}
